package com.gsnd.briuppts.web.controller;

import com.gsnd.briuppts.entity.CommonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginTestController {
    @PostMapping("/loginTest")
    public CommonResult login(String username,
                              String password){
        CommonResult cr = new CommonResult();
        if("tom".equals(username) && "123".equals(password)){
            cr.setData("登陆成功");
        }
        else{
            cr.setData("登陆失败，账号密码错误");
        }
        return cr;
    }
}
